home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / wheels1.arc / ERRMESSG.LIB < prev    next >
Text File  |  1985-06-28  |  1KB  |  34 lines

  1. {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
  2. The purchaser of these procedures and functions may include them in COMPILED
  3. programs freely, but may not sell or give away the source text.
  4.  
  5.     This function can be used after any call to the MSDOS or INTR procedures
  6.     that return an error message in AX. Usually the signal that AX contains
  7.     an error message is for the CARRY FLAG to be set to 1.
  8.        The test for CARRY FLAG set to 1 is "if Flags and 1 = 1".    }
  9.  
  10. type
  11.   Message_type = string[40];
  12. {@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}
  13. function message(code:byte):message_type;
  14. begin
  15.   case code of
  16.     2: message := 'File not found.';
  17.     3: message := 'Path not found.';
  18.     4: message := 'Too many open files (no handles left).';
  19.     5: message := 'Access denied.';
  20.     6: message := 'Invalid handle.';
  21.     7: message := 'Memory control blocks destroyed';
  22.     8: message := 'Insufficient memory';
  23.     9: message := 'Invalid memory block address.';
  24.    10: message := 'Invalid environment.';
  25.    11: message := 'Invalid format.';
  26.    12: message := 'Invalid access code.';
  27.    13: message := 'Invalid data.';
  28.    15: message := 'Invalid drive was specified.';
  29.    16: message := 'Attempt to remove current directory.';
  30.    17: message := 'Not same device.';
  31.    18: message := 'No more files.';
  32.   else message := 'Error.'
  33.   end;
  34. end;